<!DOCTYPE html>
<html lang="en"><!-- InstanceBegin template="/Templates/tp-admin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Admin - Control Panel</title>
<!-- InstanceEndEditable -->
<!-- Bootstrap core CSS -->
<?php
 session_start();
 if ($_SESSION['ID_Nhom_nguoi_dung']=='1')
	 {
		
	 }
	else
	{
		header('Location: login.php'); 
	}
if (isset($_POST['logout'])) {
    			$_SESSION['ID_Nguoi_dung'] ="";
			   $_SESSION['Ten_dang_nhap'] = "";
			   $_SESSION['Mat_khau'] ="";
			   $_SESSION['Ho_va_ten'] = "";
			   $_SESSION['Email'] = "";
			   $_SESSION['ID_Nhom_nguoi_dung'] = "";
			   header('Location: login.php'); 
    }
?>
<script src="../ckeditor/ckeditor.js"></script>
<script src="../js/jquery-1.11.0.min.js"></script>
<script src="../js/default.js"></script>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css">
<!-- Bootstrap theme -->
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap-theme.min.css">
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="../styles/style.css">
<!-- InstanceBeginEditable name="EditRegion4" -->
 <script type="text/javascript" src="../js/jquery.watermark.js"></script>
    <script type="text/javascript" src="../js/show.ntk.js"></script>
    <script type="text/javascript" src="../js/search.js"></script>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body role="document">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
      <a class="navbar-brand" href="../index.php">Ngoài Website</a> </div>
    <div class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li class="active"><a href="index.php">Home</a></li>
        <li class="dropdown"><a href="lienhe.php"  class="dropdown-toggle" data-toggle="dropdown">Liên hệ <b class="caret"></b>
          <?php 
		
		require('../config.php'); 
		$connect =  mysql_connect($host, $user, $passwd) or die(mysql_error());
		mysql_query("SET character_set_results=utf8", $connect);
		mysql_select_db($database); 
		$query = mysql_query ("SELECT COUNT(ID) as count FROM lien_he WHERE Trang_thai=1");
		$row = mysql_fetch_array($query); 
		if($row['count']==0){}else{
		echo "(".$row['count'].")"; }
		?>
          </a>
          <ul class="dropdown-menu">
            <li><a href="lienhekd.php" target="_blank">Bộ phận kinh doanh
              <?php $query = mysql_query ("SELECT COUNT(ID) as count FROM lien_he WHERE (Trang_thai=1 and ID_Bo_phan=1)");
		$row = mysql_fetch_array($query); 
		if($row['count']==0){}else{
		echo "(".$row['count'].")"; }?>
              </a></li>
            <li><a href="lienhetm.php" target="_blank">Góp ý, thắc mắc
              <?php $query = mysql_query ("SELECT COUNT(ID) as count FROM lien_he WHERE (Trang_thai=1 and ID_Bo_phan=2)");
		$row = mysql_fetch_array($query);  
		if($row['count']==0){}else{
		echo "(".$row['count'].")"; }?>
              </a></li>
          </ul>
        </li>
        <li class="dropdown"><a href="binhluan.php"  class="dropdown-toggle" data-toggle="dropdown">Bình luận<b class="caret"></b>
          <?php 
		
		require('../config.php'); 
		$connect =  mysql_connect($host, $user, $passwd) or die(mysql_error());
		mysql_query("SET character_set_results=utf8", $connect);
		mysql_select_db($database); 
		$query = mysql_query ("SELECT COUNT(ID) as count FROM Binh_luan_bai_viet WHERE Trang_thai=2");
		$row = mysql_fetch_array($query); 
		$query = mysql_query ("SELECT COUNT(ID) as count FROM Binh_luan_sach WHERE Trang_thai=2");
		$row2 = mysql_fetch_array($query); 
		$row3=$row['count'] + $row2['count'];
		if($row3==0){}else{
		echo "(".$row3.")"; }
		?>
          </a>
          <ul class="dropdown-menu">
            <li><a href="binhluanbaiviet.php" target="_blank">Bình luận bài viết
              <?php $query = mysql_query ("SELECT COUNT(ID) as count FROM Binh_luan_bai_viet WHERE Trang_thai=2");
		$row = mysql_fetch_array($query); 
		if($row['count']==0){}else{
		echo "(".$row['count'].")"; }?>
              </a></li>
            <li><a href="binhluansach.php" target="_blank">Bình luận sách
              <?php $query = mysql_query ("SELECT COUNT(ID) as count FROM Binh_luan_sach WHERE Trang_thai=2");
		$row = mysql_fetch_array($query);  
		if($row['count']==0){}else{
		echo "(".$row['count'].")"; }?>
              </a></li>
          </ul>
        </li>
        <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Báo cáo <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="bcdoanhthu.php" target="_blank">Doanh thu, lãi suất hiện tại</a></li>
            <li><a href="bcnhap.php" target="_blank">Chi phí nhập hàng hiện tại</a></li>
            <li><a href="bcsachbanchay.php" target="_blank">Sách bán chạy hiện tại </a></li>
            <li class="divider"></li>
            <li><a href="bcdoanhthuthangtruoc.php" target="_blank">Doanh thu, lãi suất tháng trước</a></li>
            <li><a href="bcnhapthangtruoc.php" target="_blank">Chi phí nhập hàng tháng trước</a></li>
            <li><a href="bcsachbanchaythangtruoc.php" target="_blank">Sách bán chạy tháng trước </a></li>
            <li class="divider"></li>
            <li><a href="baocao.php">Báo cáo khác</a></li>
          </ul>
        </li>
        <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Trợ giúp <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="thongtin.php">Thông tin</a></li>
            <li><a href="huongdan.php">Hướng dẫn sử dụng</a></li>
            <li><a href="#">Something else here</a></li>
        
          </ul>
        </li>
        <li style="color:#FFF; margin-left:150px;" > <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="color:#FFF;"> Chào <?php echo $_SESSION['Ho_va_ten']; ?> </a> </li>
       <li style="color:#FFF;" > <form method="post"><button class="form-control" type="submit" name="logout" style="margin-top:7px;">Thoát </button></form> </li>
      </ul>
    </div>
    <!--/.nav-collapse --> 
  </div>
</div>
<div class="admain">
  <div id='cssmenu'>
    <ul>
      <li class='has-sub'><a href='#'><span>Chủ đề</span></a>
        <ul>
          <li ><a href='chude.php'><span>Danh sách</span></a> </li>
          <li ><a href='themchude.php'><span>Thêm mới</span></a> </li>
        </ul>
      </li>
      <li class='has-sub'><a href='#'><span>Tác giả</span></a>
        <ul>
          <li ><a href='tacgia.php'><span>Danh sách</span></a> </li>
          <li ><a href='themtacgia.php'><span>Thêm mới</span></a> </li>
        </ul>
      </li>
      <li class='has-sub'><a href='#'><span>Nhà xuất bản</span></a>
        <ul>
          <li ><a href='nhaxuatban.php'><span>Danh sách</span></a> </li>
          <li ><a href='themnxb.php'><span>Thêm mới</span></a> </li>
        </ul>
      </li>
      <li class='has-sub'><a href='#'><span>Sách</span></a>
        <ul>
          <li ><a href='sach.php'><span>Danh sách</span></a> </li>
          <li ><a href='sachhh.php'><span>Sách hết hàng
          <?php 
		  $query5 = mysql_query ("SELECT COUNT(id) as count
		FROM Sach WHERE (So_luong<=0 and ID_Tinh_trang_sach !=3 and ID_Tinh_trang_sach !=2)");
		$row5 = mysql_fetch_array($query5); 
		if($row5['count']==0){}else{
		echo "(".$row5['count'].")"; }
		  ?>
          
          </span></a> </li>
          <li ><a href='sachsaphh.php'><span>Sách sắp hết hàng
          
           <?php 
		  $query5 = mysql_query ("SELECT COUNT(id) as count
		FROM Sach WHERE (So_luong<=10 and So_luong> 0 and ID_Tinh_trang_sach !=3 and ID_Tinh_trang_sach !=2)");
		$row5 = mysql_fetch_array($query5); 
		if($row5['count']==0){}else{
		echo "(".$row5['count'].")"; }
		  ?>
          </span></a> </li>
          <li ><a href='themsach.php'><span>Thêm mới</span></a> </li>
          <li class='has-sub'><a href='#'><span>Tình trạng sách</span></a>
            <ul>
              <li><a href='ttsach.php'><span>Danh sách</span></a></li>
              <li ><a href='themttsach.php'><span>Thêm mới</span></a></li>
            </ul>
          </li>
          <li class='has-sub'><a href='#'><span>Giảm giá</span></a>
            <ul>
              <li><a href='giamgia.php'><span>Danh sách</span></a></li>
              <li ><a href='themgiamgia.php'><span>Thêm mới</span></a></li>
            </ul>
          </li>
          <li ><a href='dexuat.php'><span>Đề xuất sách</span></a>
            
          </li>
        </ul>
      </li>
      <li class='has-sub'><a href='#'><span>Mua/Bán</span></a>
        <ul>
          <li class='has-sub'><a href='#'><span>Bán hàng</span></a>
            <ul>
              <li><a href='dsbh.php'><span>Danh sách hóa đơn</span></a></li>
              <li><a href='dsdathang.php'><span>Hóa đơn đặt hàng</span></a></li>
              <li><a href='dsdangchuyen.php'><span>Hóa đơn đang chuyển</span></a></li>
              <li><a href='dsthanhcong.php'><span>Hóa đơn thành công</span></a></li>
              <li><a href='dshuy.php'><span>Hóa đơn hủy</span></a></li>
            </ul>
          </li>
          <li class='has-sub'><a href='#'><span>Nhập hàng</span></a>
            <ul>
              <li><a href='dsnh.php'><span>Danh sách hóa đơn</span></a></li>
              <li class='last'><a href='nh.php'><span>Nhập hàng</span></a></li>
            </ul>
          </li>
          <li class='has-sub'><a href='#'><span>Nhà cung cấp</span></a>
            <ul>
              <li><a href='ncc.php'><span>Danh sách</span></a></li>
              <li class='last'><a href='themncc.php'><span>Thêm mới</span></a></li>
            </ul>
          </li>
        </ul>
      </li>
      <li class='has-sub'><a href='#'><span>Tài khoản</span></a>
        <ul>
          <li ><a href='nguoidung.php'><span>Danh sách</span></a> </li>
          <li ><a href='themnguoidung.php'><span>Thêm mới</span></a> </li>
          <li class='has-sub'><a href='#'><span>Nhóm tài khoản</span></a>
            <ul>
              <li ><a href='ntk.php'><span>Danh sách</span></a> </li>
              <li ><a href='themntk.php'><span>Thêm mới</span></a> </li>
            </ul>
          </li>
          <li class='has-sub'><a href='#'><span>Tỉnh, thành phố</span></a>
            <ul>
              <li ><a href='tinh.php'><span>Danh sách</span></a> </li>
              <li ><a href='themtinh.php'><span>Thêm mới</span></a> </li>
            </ul>
          </li>
          <li class='has-sub'><a href='#'><span>Quận, huyện</span></a>
            <ul>
              <li ><a href='huyen.php'><span>Danh sách</span></a> </li>
              <li ><a href='themhuyen.php'><span>Thêm mới</span></a> </li>
            </ul>
          </li>
        </ul>
      </li>
      <li class='has-sub'><a href='#'><span>Bài viết</span></a>
        <ul>
          <li ><a href='baiviet.php'><span>Danh sách</span></a> </li>
          <li ><a href='thembaiviet.php'><span>Thêm mới</span></a> </li>
          <li class='has-sub'><a href='#'><span>Nhóm bài viết</span></a>
            <ul>
              <li><a href='nbv.php'><span>Danh sách</span></a></li>
              <li class='last'><a href='themnbv.php'><span>Thêm mới</span></a></li>
            </ul>
          </li>
        </ul>
      </li>
    </ul>
  </div>
  <div class="content"><!-- InstanceBeginEditable name="content" -->
   <p class="bg-warning tieude">DANH SÁCH NHÓM TÀI KHOẢN</p>
        <div id="paging">
        <div  id="search">
            <select name="mySelect" id="where" style="height:21px" >
            <option value="1"> Tìm theo tên</option>
            <option value="2">Tìm theo ID</option>
          </select>
            <input name="query" type="text" id="faq_search_input_ncc"  />
          </div>
        <ul id="pages">
            <li class="pageInfo"></li>
            <li class="goPrevious">&lsaquo;&lsaquo; Previous</li>
            <li>
            <input type="text" class="currentPage" id="currentPage"/>
          </li>
            <li class="goNext">Next &rsaquo;&rsaquo;</li>
          </ul>
        <div class="result_search faq-articles" id="searchresultdata_ncc" style="border:1px solid red;"></div>
        <table width="1000" border="1" class="tb1">
            <tr class="center chudam dong1">
            <td width="50"><input id="check_all" type="checkbox" /></td>
            <td width="150">Mã nhà cung cấp</td>
            <td width="650">Tên nhóm tài khoản</td>
            <td width="150">Tác vụ</td>
          </tr>
          </table>
        <form method="post" >
            <table id="rows" class="tb">
          </table>
            <div class="row">
            <div class="col-md-4">
                <button onsubmit="return false" name="xoa2" type="submit" class="btn btn-primary btn-block pd confirmdelete">Xóa</button>
              </div>
            <div class="col-md-4 col-md-offset-4"> <a href="themntk.php" target="_blank">
              <button type="button" class="btn btn-primary  btn-block pd">Thêm</button>
              </a></div>
          </div>
          </form>
      </div>
  
  <!-- InstanceEndEditable --> </div>
</div>

<!-- Bootstrap core JavaScript
    ================================================== --> 
<!-- Placed at the end of the document so the pages load faster --> 
<script src="../bootstrap/js/bootstrap.min.js"></script>
</body>
<!-- InstanceEnd --></html>
